package org.vaadin.nf4v.ext.config.afternav;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Marks page method as navigation AFTER_NAVIGATION state listener.
 * This state is fired after page is placed inside navigator (after actual navigation ends)
 *
 * Annotated method may be public or private.
 * Allowed method parameters: no parms, Params object, NavigationRequest object.
 */
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface AfterNavigation {

    /**
     * Identifies page instance reusability support.
     * By default it's true
     * @return true if page supports instance reuse for parameter change request, false otherwise
     */
    boolean reuseInstance() default true;
}
